<div id="layout_main_top">

</div>
<div id="layout_main">

{if $smarty.session.level gte $USER_RIGHTS.rp_category_add}
	<div class="admin_menu">
		<a href='index.php?page=admin_rpcategory&action=new'><img src="./images/buttons/raid_add.png" alt="" /> Add Category</a>
	</div>
{/if}


<DIV class="layout_large_table_top">

</DIV>
<DIV class="layout_large_table">
<table id="main_table" cellspacing='0' >
<tr class="menu_header">
	<th>#</th>
	<th align='left'>
			Name
	</th>
	<th align='left'>
			Shortname
	</th>
	<th>
			Picture
	</th>
	<th>
		&nbsp;
	</th>
</tr>

{foreach name=categories item=category_item from=$rp_category}


	<tr class="{cycle values="row_1,row_2" advance=true}" id="user{$single_user.user_id}">
	<td>{$category_item.category_id}</td>
	<td align='left'>{$category_item.category_short_name}</td>
	<td align='left'>{$category_item.category_long_name}</td>
	<td align='center'>
	{if !empty($category_item.category_image)}
	   <img src="./images/attributes/{$category_item.category_image}" alt="picture" />
	{else}
	   No picture
	{/if}
	</td>
	<td>
	{if $smarty.session.level gte $USER_RIGHTS.rp_category_delete}
	<img src="./images/buttons/delete.gif" alt="" onclick="javascript:deleteRpCategory({$category_item.category_id}, 'admin_rpcategory')" />
	{/if}
	{if $smarty.session.level gte $USER_RIGHTS.rp_category_change}
	<a href='index.php?page=admin_rpcategory&action=edit&category_id={$category_item.category_id}'><img src="./images/buttons/edit.gif" alt="" width="14" height="14" {popup text="Edit this category" center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} /></a>
	{/if}
	</td>
</tr>

{foreachelse}
<tr class="{cycle values="row_1,row_2"}">
	<td colspan=8>No categories could be found.</td>
</tr>

{/foreach}

<tr class="{cycle values="row_1,row_2"}">
	<td colspan=8>

	</td>
</tr>

<tr class="menu_footer">
	<td colspan=8></td>
</tr>



</table>
</div>

<DIV class="layout_large_table_bottom">

</DIV>
</div>
<div id="layout_main_bottom">

</div>
